<template>
  <div class="dashboard-container">
    <ul>
      <li v-for="item in studentList" :key="item.id">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
import studentApi from '@/api/xy/student'
export default {
  name: 'Dashboard',
  data() {
    return {
      studentList: []
    }
  },
  created() {
    this.getStudentList()
  },
  methods: {
    getStudentList() {
      // 手动携带token
      studentApi.getStudentList()
        .then(res => {
          this.studentList = res.data.list
        })
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
